package com.dengdai.applibrary.activitys;


import com.dengdai.applibrary.BaseApplication;
import com.dengdai.applibrary.config.ResIdName;
import com.dengdai.applibrary.config.ViewInfo;
import com.dengdai.applibrary.interfaces.TopIndicatorInterface;
import com.dengdai.applibrary.utils.BaseViewUtils;
import com.dengdai.applibrary.widgets.custom.TopIndicatorView;


/**
 * @说明 头部指示器公共界面
 * @作者 LY
 * @时间 16/5/26 10:17
 * @邮箱 2743569843@qq.com
 * @版权 Copyright(c) 2016 LY-版权所有
 * @备注
 */
public abstract class BaseTopIndicatorActivity extends BaseActivity implements TopIndicatorInterface {
    protected TopIndicatorView topIndicatorView;

    @Override
    public int getLayoutResID() {
        return BaseViewUtils.gainResId(BaseApplication.getAppContext(), BaseViewUtils.LAYOUT, ViewInfo.BASE_TOP_INDICATOR);
    }

    @Override
    public void initData() {
        topIndicatorView = (TopIndicatorView) findViewById(BaseViewUtils.gainResId(BaseApplication.getAppContext(), BaseViewUtils.ID, ResIdName.TOPINDICATORVIEW));
    }

    @Override
    public void business() {
        topIndicatorView.initData(getContentFragmentManager(), getTopIndicator(), getContentFragment(), isShouldExpand());
    }
}
